<template>
  <div id="app">
    <router-view />
  </div>
</template>

<script>
import api from '@/api'

export default {
  name: 'App',
  methods: {
    message() {
      api.supplier.notification().then(response => {
        const { data } = response
        const { has } = data
        if (has) {
          this.$notify({
            title: '待审核',
            message: `${has.text}: id => ${has.model_id}`,
            type: 'warning',
            duration: 2000
          })
        }
      })
    }
  },
  created() {
    // console.log('supplier ...')
    // console.log(process.env.VUE_APP_SUPPLIER === 'true')
    // console.log(+process.env.VUE_APP_SUPPLIER_TIME)
    // if (process.env.VUE_APP_SUPPLIER === 'true') {
    //   setInterval(() => {
    //     this.message()
    //   }, +process.env.VUE_APP_SUPPLIER_TIME)
    // }
    // console.log(process.env)
  }
}
</script>
